{% extends "base.html" %}

{% block title %}检查成员密码{% endblock title %}

{% block content %}
<div id="mb_confirm" class="mbskin">
    <h1>检查成员密码</h1>
    {% if request.url == url_for('member_leave_form') %}
        <p>
            <strong>如果您想离开会员，请再次输入您的密码。.</strong>
        </p>
    {% else %}
        <p>
            <strong>请再输入一次密码.</strong>
            再次检查您的密码以保护您的信息.
        </p>
    {% endif %}

    <form name="fmemberconfirm" action="{{ action_url }}"
          onsubmit="return fmemberconfirm_submit(this)"
          method="post">
        <input type="hidden" name="mb_id" value="{{ member.mb_id }}">
        <input type="hidden" name="token" value="">

        <fieldset>
            <span class="confirm_id">会员Id</span>
            <span id="mb_confirm_id"> {{ member.mb_id }} </span>
            <label for="confirm_mb_password" class="blind">密码<strong>必不可少的</strong></label>
            <input type="password" name="mb_password" id="confirm_mb_password" required class="required frm_input"
                   size="15" maxLength="20" placeholder="密码">
            <input type="submit" value="检查" id="btn_submit" class="btn_submit">
        </fieldset>
    </form>
</div>

<script>
    function fmemberconfirm_submit(f)
    {
        document.getElementById("btn_submit").disabled = true;

        f.token.value = generate_token();

        return true;
    }
</script>
{% endblock content %}
